package jiuxing

type Msg41 struct {
	Tm           []byte
	Vin          string
	Balance      int
	AllowCharge  byte
	RefuseReason byte
	BillMode     byte
}

func (msg *Msg41) Encode() []byte {
	ret := make([]byte, 0)
	ret = append(ret, msg.Tm...)
	ret = append(ret, String2ByteWithlen(msg.Vin, 17)...)
	ret = append(ret, IntToBytes(msg.Balance)...)
	ret = append(ret, msg.AllowCharge)
	ret = append(ret, msg.RefuseReason)
	ret = append(ret, msg.BillMode)
	return ret
}
